class Solution(object):
    def poorPigs(self, buckets, minutesToDie, minutesToTest):
        """
        :type buckets: int
        :type minutesToDie: int
        :type minutesToTest: int
        :rtype: int
        """
        if buckets == 1:
            return 0
        tests = minutesToTest // minutesToDie
        base = tests + 1
        if base == 1:
            return 10**9
        total = 1
        x = 0
        while total < buckets:
            x += 1
            total *= base
        return x